class Product():
    def __init__(self,name,price):
        self.name = name
        self.price =price
    def __str__(self):
        return f"Product price={self.price } name={self.name}"
    def addProduct(self,car):
       car.addProduct(self)

class ShoppingCar():
    def __init__(self):
        self.ProductList = []
    def addProduct(self,produce):
        self.ProductList.append(produce)
    def ShowProduceAll(self):
        for produce in self.ProductList:
            print(produce)
if __name__ == '__main__':
    shoppingCar = ShoppingCar()
    p1 = Product("苹果",3)
    p2 = Product("香蕉",4)
    p1.addProduct(shoppingCar)
    p2.addProduct(shoppingCar)
    shoppingCar.ShowProduceAll()
